import request from '@/utils/request'


export default{
    //根据课程id获取所有章节和小节信息
    getAllChapterVideo(courseId){
        return request({
            url: `/eduservice/chapter/getChapterVideo/${courseId}`,
            method: 'get'
          })
    },
    //添加小节
    addVideo(video){
        return request({
            url: `/eduservice/video/addVideo`,
            method: 'post',
            data:video
          })
    },

    //根据id查询章节
    getVideo(videoId){
        return request({
            url: `/eduservice/video/getVideoInfo/${videoId}`,
            method: 'get'
          })
    },

    //修改章节
    updateVideo(video){
        return request({
            url: `/eduservice/video/updateVideo`,
            method: 'post',
            data:video
          })
    },

    //删除章节
    deleteVideo(videoId){
        return request({
            url: `/eduservice/video/${videoId}`,
            method: 'delete'
          })
    },
       
    //删除阿里云视频
    deleteAliyunvod(id){
        return request({
            url: `/eduvod/video/removeAliyunVideo/${id}`,
            method: 'delete'
            })
    },

}
